// MyMessages.cpp

#include "StdAfx.h"

#include "MyMessages.h"

#include "Common/System/Error.h"
#include "Common/String/ResourceString.h"

#ifdef LANG
#include "Common/Lang/LangUtils.h"
#endif

using namespace Common;
using namespace Common::System;

void ShowErrorMessage(HWND window, LPCWSTR message)
{
  ::MessageBoxW(window, message, L"7-Zip", MB_OK | MB_ICONSTOP);
}

void ShowErrorMessageHwndRes(HWND window, UINT resID
    #ifdef LANG
    , UINT32 langID
    #endif
    )
{
  ShowErrorMessage(window,
  #ifdef LANG
  Lang::LangString(resID, langID)
  #else
  MyLoadString(resID)
  #endif
  );
}

void ShowErrorMessageRes(UINT resID
    #ifdef LANG
    , UINT32 langID
    #endif
    )
{
  ShowErrorMessageHwndRes(0, resID
  #ifdef LANG
  , langID
  #endif
  );
}



